package com.txtsqlclient.ui;

import java.lang.reflect.Field;

/**
 * @author spadda
 * 
 */
public class ReflectionHelper {
	public static void setField(Class<?> c, Object o, String fieldName,
			Object fieldValue) throws NoSuchFieldException,
			IllegalAccessException {
		Field f = c.getDeclaredField(fieldName);
		f.setAccessible(true);
		f.set(o, fieldValue);
	}

	public static Object getField(Class<?> c, Object o, String fieldName)
			throws NoSuchFieldException, IllegalAccessException {
		Field f = c.getDeclaredField(fieldName);
		f.setAccessible(true);
		return f.get(o);
	}
}
